<?php
define('UPGRADE_SOAP', 1);

include_once('init.php');

$tpl = urldecode($_GET['tpl']);
$tplinfo = unserialize(getUpgradeFile($tpl));

if (!file_exists(P_TPL.DS.$tplinfo['archive'])) exit(0);

// output file
output_file(P_TPL.DS.$tplinfo['archive'], $tplinfo['archive']);